//
//  MyController.m
//  Pac-Man
//
//  Created by mac on 2019/8/16.
//  Copyright © 2019 mac. All rights reserved.
//

#import "MyController.h"

@interface MyController ()
@property (weak, nonatomic) IBOutlet UIImageView *headIimageView;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *integralLabel;

@end

@implementation MyController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    NSUserDefaults *userdefalts = [NSUserDefaults standardUserDefaults];
    NSString *phone = [userdefalts objectForKey:@"kPhone"];
    if (phone!=nil) {
      _nameLabel.text = phone;
    }
    
    CGFloat sumNum = 0;
    NSString *integral = [userdefalts objectForKey:@"integral"];
    if (integral!=nil) {
        sumNum+=[integral floatValue];
    }
    _integralLabel.text = [NSString stringWithFormat:@"%.0f",sumNum];
}

@end
